package com.webchat.ugc.service;

import com.webchat.common.bean.APIResponseBean;
import com.webchat.common.bean.APIResponseBeanUtil;
import com.webchat.domain.vo.response.MessageCardTemplateResponseVO;
import com.webchat.rmi.pgc.MessageCardTemplateClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MessageCardTemplateService {


    @Autowired
    private MessageCardTemplateClient messageCardTemplateClient;


    public MessageCardTemplateResponseVO get(String templateId) {
        APIResponseBean<MessageCardTemplateResponseVO> responseBean =
                messageCardTemplateClient.template(templateId);
        if (APIResponseBeanUtil.isOk(responseBean)) {
            return responseBean.getData();
        }
        return null;
    }
}
